Conditional Order Engine (COE),
The Client
Australia’s leading online stock
broker, Bell Direct, has been in the business of online share trading
and investment for more than 25 years of experience.
Bell Direct offers all the features that include full
service online share trading platform — where you can trade
ASX listed equities, warrants and interest rate securities
The Challenge
Bell Direct required a highly sophisticated
automatic order placement system. The system was to monitor conditional
orders by matching the posted conditions against the incoming prices
of various stocks. The system was to place an order to Order System
interface once the condition matched. The challenge was to create
a system that would process about more than hundreds of conditions
against the incoming stock data which is at the rate of more than
11,000 data per minute. The system had to be efficient and robust.
Also, the system was required to monitor and process
the new, update and cancel conditional orders.
Solution
Conditional order engine (CEO), a windows
service was designed to create a highly sophisticated automatic order
placement system. The system monitors conditional order and the price
events submitted to the engine and process the required. Once the
conditions match, it places an order to order system interface.
Also, the system has the ability to monitor and process the new, update
and cancel conditional orders. Conditional order engine stops the
process.
Components of the Conditional Order Engine
Conditional order: MSMQ server
stores and sends conditional orders to the conditional order engine.
Price event: MSMQ server stores price events
arriving from different stock servers and sends to the conditional
order engine.
Event receiver: external events (price events
and order conditions) arriving at the conditional order engine are
received by event receivers (ER), each of which runs in a separate
thread, receiving events from a particular source. The ER threads
shall be responsible for desterilizing them in the conditional order
engine.
Query engine: the conditional
order query engine is a single thread that is responsible for most
of the query processing work. The query engine continually looks for
the incoming price and/or volume for a mach with the conditions. Upon
finding matching conditions with price, the engine triggers an order
and posts the order to existing order system.